package sqldriver

import (
	"database/sql"
	_ "github.com/mattn/go-sqlite3"
)

func GetSqlliteDB(filename string) (*sql.DB, error) {
	//if *debug {
	//	fmt.Printf(" password:%s\n", *password)
	//	fmt.Printf(" port:%d\n", *port)
	//	fmt.Printf(" server:%s\n", *server)
	//	fmt.Printf(" user:%s\n", *user)
	//}
	//connString := fmt.Sprintf("server=%s;database=%s;user id=%s;password=%s;port=%d;encrypt=disable", *server, *database2, *user, *password, *port)
	//if *debug {
	//	fmt.Printf(" connString:%s\n", connString)
	//}
	//db, err := sql.Open("mssql", connString)
	//if err != nil {
	//	log.Fatal("Open connection failed:", err.Error())
	//	return nil, err
	//}
	//err = db.Ping()
	//if err != nil {
	//	fmt.Print("PING:%s", err)
	//	return nil, err
	//}
	db, err := sql.Open("sqlite3", filename)
	return db, err
}
